package com.itheima.date.myexce;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class ExceptionDemo {
    public static void main(String[] args) throws Exception {
        method();
    }

    private static void method() throws Exception {
        String s = "2020年10月10日";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");

        Date date = sdf.parse(s);
        System.out.println(date);
    }
}
